package com.hod.roommap.client.model;

import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.core.Function;
import com.gwtext.client.data.Record;
import com.gwtext.client.data.Store;
import com.gwtext.client.widgets.PaddedPanel;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.form.FormPanel;
import com.gwtext.client.widgets.grid.AbstractSelectionModel;
import com.gwtext.client.widgets.layout.AnchorLayout;
import com.gwtext.client.widgets.layout.ColumnLayout;
import com.gwtext.client.widgets.layout.ColumnLayoutData;
import com.gwtext.client.widgets.layout.FitLayout;
import com.gwtext.client.widgets.layout.RowLayout;
import com.gwtext.client.widgets.layout.RowLayoutData;

public abstract class CRUD {
	protected GearsDataStore ds;
	protected String title = "Credits";
	protected int gridHeight = 100;
	protected int gridwidth = 500;
	protected int spacing = 15;
	protected String autoExpandColumn = "descCol";
	protected HODForm formPanel = null;
	protected String gridPanelTitle = "Company Data";
	protected String FieldsetTitle = "Company Details";
	protected int formWidth = 800;
	protected int gridPanelHeight = 300;
	public AbstractGrid gridPanel;
	protected Record actualRecord;
	protected abstract void buildPanelSearch();
	protected abstract AbstractSelectionModel createSelectionModel();
	protected abstract Widget formTabs();
	public abstract HODForm createFormPanel();
	
	public CRUD() {
		// TODO Auto-generated constructor stub
	}
	
	public Store getStore(){
		return gridPanel.store;
	}
	
	public HODForm loadObjectinFormPanel(GearsDataObject object) {
		// TODO Auto-generated method stub
		formPanel = createFormPanel();
		formPanel.setObject(object);
		return formPanel;
	}

	


}
